package com.yunwushanhe.document.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * @author 云雾山河
 * target 这个类的建立是为了把数据的交互格式统一
 */
@Data
@Component
@NoArgsConstructor
@AllArgsConstructor
public class Unify {
    private String message;
    private Object data;
    private boolean flag;

    public void setUnifyData(Object data){
        this.flag = true;
        this.data = data;
        this.message = "操作成功！";
    }


    public void setUnifyDataAndMessage(Object data,String message){
        this.flag = true;
        this.data = data;
        this.message = message;
    }
}
